/*
 * msgHeaderDefs.h
 *
 * Created: 6/18/2013 2:16:48 AM
 *  Author: Tim
 */ 


#ifndef MSGHEADERDEFS_H_
#define MSGHEADERDEFS_H_

#include <inttypes.h>

#include "adcPacketStructs.h"
#include "dacPacketStructs.h"
#include "dioPacketStructs.h"
#include "encPacketStructs.h"
#include "genPacketStructs.h"
#include "tmrPacketStructs.h"
#include "pwmPacketStructs.h"

#define outpuPacketLength_MAX	22

//same for all messages
#define packetHeader			0x55

//message header index

/************GEN***************/
	
#define general_mh_msk			0xF0

#define ack_mh					0xFE

#define resetDaq_mh				0xFD

#define startProgram_mh			0xFC

#define stopProgram_mh			0xFB

#define daqReady_mh				0xFA

/************ADC***************/

#define adc_mh_msk				0x00

#define adcInit_mh				0x01

/************DAC***************/

#define dac_mh_msk				0x10

#define dacEnable_mh			0x11

/************DIO***************/

#define dio_mh_msk				0x20

#define digitalInEnable_mh		0x21

#define digitalOutEnable_mh		0x22

/************ENC***************/

#define enc_mh_msk				0x30

#define encInit_mh				0x31

/************TMR***************/

#define tmr_mh_msk				0x40

#define tmrSetFreq_mh			0x41


/************PWM***************/

#define pwm_mh_msk				0x50

#define	servoEnable_mh			0x51
	
#define	motorEnable_mh			0x52

/***********SUPER**************/

#define SuperPacket_mh_msk		0x60

#define outputSuperPacket_mh	0x61

#define inputSuperPacket_mh		0x62

#define actuatorSuperPacket_mh	0x63

#endif /* MSGHEADERDEFS_H_ */
